import { createStore } from 'vuex'

export default createStore({
    namespaced: true,
    state: {
        infoTrue: [],
        infoFalse: [],
        times: 20
    },
    mutations: {
        trues(state, context) {
            state.infoTrue.push(context)
            localStorage.setItem('user-true', JSON.stringify(state.infoTrue))
        },
        falses(state, context) {
            state.infoFalse.push(context)
            localStorage.setItem('user-false', JSON.stringify(state.infoFalse))
        },
        INIT_TIMES(state) {
            state.times = 20
        }
    },
    actions: {},
    modules: {

    },
    getters: {
        CHANGE_TIMES(state) {
            return state.times--
        }
    }
})